package com.briup.cms.service.impl;

import com.briup.cms.common.model.ext.RoleExt;
import com.briup.cms.dao.RoleMapper;
import com.briup.cms.service.RoleService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author YuYan
 * @date 2024-01-09 19:42:53
 */
@Service
@RequiredArgsConstructor
public class RoleServiceImpl implements RoleService {
    private  final RoleMapper roleMapper;

    @Override
    public RoleExt getById(Integer id) {
        return  RoleExt.toExt(roleMapper.selectById(id));
    }

    @Override
    public List<RoleExt> list() {
        return  RoleExt.toExt(roleMapper.selectList(null));
    }
}
